home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Book Chapters / 03 - Advanced Graphics / Example 3 / sprite.h < prev   
Text File  |  1995-02-24  |  845b  |  40 lines

  1. //
  2. //    File: sprite.h
  3. //
  4. //    This file is the header for sprite.c.
  5. //
  6. //    2/18/95 -- Created by Mick
  7. //
  8.  
  9. // shield
  10. #ifndef _sprite_h_
  11. #define _sprite_h_
  12.  
  13. // include files
  14.  
  15. #include <QDOffscreen.h>
  16.  
  17. // global defines
  18.  
  19. // global typedefs
  20.  
  21. typedef struct
  22. {
  23.     Rect fSpriteRect;                                // the rect that defines the bounds of the sprite
  24.     GWorldPtr fSpriteWorld;            // the gworld for the sprite data
  25.     PixMapHandle fSpritePix;        // the pixmap of the sprite data
  26. } tSpriteInfo;
  27.  
  28. // extern functions
  29.  
  30. extern tSpriteInfo *loadSprite( signed short inSpriteResID );
  31. extern void disposeSprite( tSpriteInfo *inSpriteInfo );
  32. extern void startSpriteDraw( Rect *inClipRect, PixMapHandle inDestPixMap );
  33. extern void endSpriteDraw( void );
  34. extern void drawSprite( tSpriteInfo *inSpriteInfo, Point inWhere );
  35.  
  36. // extern data
  37.  
  38. // end of shield
  39. #endif // #ifndef _sprite_h_
  40.